import com.alibaba.fastjson2.JSONObject;

public class SlowSqlInfo {

    Long id;
    String checksum;
    String distillate;
    String fingerprint = "fingerprint";
    String queryCount = "200";
    String tsMin = "2020-01-01 00:00:00";
    String tsMax = "2020-01-31 23:59:59";
    String db = "dbx";
    String host = "localhost";
    String user = "root";
    String queryTimeSum = "300";
    String rawFilePath;
    String rawFileSize;
    String jsonFilePath;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getChecksum() {
        return checksum;
    }

    public void setChecksum(String checksum) {
        this.checksum = checksum;
    }

    public String getDistillate() {
        return distillate;
    }

    public void setDistillate(String distillate) {
        this.distillate = distillate;
    }

    public String getFingerprint() {
        return fingerprint;
    }

    public void setFingerprint(String fingerprint) {
        this.fingerprint = fingerprint;
    }

    public String getQueryCount() {
        return queryCount;
    }

    public void setQueryCount(String queryCount) {
        this.queryCount = queryCount;
    }

    public String getTsMin() {
        return tsMin;
    }

    public void setTsMin(String tsMin) {
        this.tsMin = tsMin;
    }

    public String getTsMax() {
        return tsMax;
    }

    public void setTsMax(String tsMax) {
        this.tsMax = tsMax;
    }

    public String getDb() {
        return db;
    }

    public void setDb(String db) {
        this.db = db;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getQueryTimeSum() {
        return queryTimeSum;
    }

    public void setQueryTimeSum(String queryTimeSum) {
        this.queryTimeSum = queryTimeSum;
    }

    public String getRawFilePath() {
        return rawFilePath;
    }

    public void setRawFilePath(String rawFilePath) {
        this.rawFilePath = rawFilePath;
    }

    public String getRawFileSize() {
        return rawFileSize;
    }

    public void setRawFileSize(String rawFileSize) {
        this.rawFileSize = rawFileSize;
    }

    public String getJsonFilePath() {
        return jsonFilePath;
    }

    public void setJsonFilePath(String jsonFilePath) {
        this.jsonFilePath = jsonFilePath;
    }

    public static void main(String[] args) {
        SlowSqlInfo slowSqlInfo = new SlowSqlInfo();
        StringBuilder description_str = new StringBuilder();
        description_str.append(String.format("主机 %s，数据库 %s, 执行SQL %s, 共 %s 次, 用时 %s 秒,首次执行时间 %s, 最后一次执行时间 %s ",
                slowSqlInfo.getHost(), slowSqlInfo.getDb(), slowSqlInfo.getFingerprint(),
                slowSqlInfo.getQueryCount(), slowSqlInfo.getQueryTimeSum(), slowSqlInfo.getTsMin(), slowSqlInfo.getTsMax()));
        System.out.println(description_str);
        JSONObject annotations = new JSONObject();
        annotations.put("summary", "有慢SQL产生");
        annotations.put("description", description_str.toString());
        System.out.println(annotations);
    }
}
